import { defineConfig } from 'vitepress'

import nav from '../config/nav'
import sidebar from '../config/sidebar'

export default defineConfig({
  title: "小新文档",
  head: [
    [
      'script',
      {},
      `
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?687100916c868b2a939767edd123a721";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
      `
    ]
  ],
  description: "不要试图从头开始，站在巨人的肩膀上。",
  lastUpdated: true,
  themeConfig: {
    nav,
    sidebar,

    search: {
      provider: 'local'
    },

    socialLinks: [
      { icon: 'github', link: 'https://github.com/lintong7' }
    ],

    footer: {
      message: '<a href="https://beian.miit.gov.cn/" target="_blank">粤ICP备2021114482号-1</a>',
      copyright: 'Copyright © 2019-' + new Date().getFullYear() + ' 小新文档'
    },
  },
  ignoreDeadLinks: true
})